/*
	Name:
	Copyright:Take it at will
	Author:Rodney
	Date: 
	Description:
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
    float sin=0,eps,x,t=1,jc=1;
    int i=1,tag=1;
    scanf("%f%f",&x,&eps);
    do
    {
        sin+=tag*t;
        tag=-tag;
        jc=jc*(i+1)*(i+2);
        i+=2;
        t = pow(x,i)/jc;
        printf("%.2f %d\n",jc,i);
    }while(t>eps);
    printf("%.2f\n",sin);
}

